package com.weishi.project.training.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.weishi.framework.aspectj.lang.annotation.Excel;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;


/**
 * 心率计次数据
 */
@Data
@TableName("tbl_heart_rate_count")
public class HeartRateCount implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 心率表计次数据 */
    private Integer id;
    
    /** 航道表 id */
    @Excel(name = "航道表 id")
    private Integer channelId;
    
    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date ctime;
    
    /** 训练日 id  */
    @Excel(name = "训练日 id ")
    private Integer trainingDayId;
    
    /** 组 id */
    @Excel(name = "组 id")
    private Integer groupId;

    /** 时间戳 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "时间戳", width = 30, dateFormat = "yyyy-MM-dd")
    private Date time;

    @Excel(name = "成绩")
    private String pointAchievement;

    @Excel(name = "船速")
    private Double shipSpeed;

    @Excel(name = "船速仪 id")
    private String shipSpeedId;

    @Excel(name = "船速仪总距离")
    private Double totalDistance;

    @Excel(name = "桨频")
    private String propellerFrequency;

    @Excel(name = "分段序号（ 0 ，1 ，2 ，3）")
    private Integer stage;

    public static Map<String,Object> toMap(HeartRateCount heartRateCount){
        Map<String,Object> map = new HashMap<>();
        map.put("id",heartRateCount.getId());
        map.put("channelId",heartRateCount.getChannelId());
        map.put("ctime",heartRateCount.getCtime());
        map.put("trainingDayId",heartRateCount.getTrainingDayId());
        map.put("groupId",heartRateCount.getGroupId());
        map.put("time",heartRateCount.getTime());
        map.put("pointAchievement",heartRateCount.getPointAchievement());
        map.put("shipSpeed",heartRateCount.getShipSpeed());
        map.put("shipSpeedId",heartRateCount.getShipSpeedId());
        map.put("totalDistance",heartRateCount.getTotalDistance());
        map.put("propellerFrequency",heartRateCount.getPropellerFrequency());
        map.put("stage",heartRateCount.getStage());
        return map;
    }


}